import api from './index'

// 订单相关接口
export default {
	// 判断是否有储值卡和会员卡
	judgeCard: (params) => api.get('/system/member/appJudgment', params),
	// 查询附加商品
	fetchAccessory: (params) => api.get('/system/store/product/list', params),
	// 查询包间
	// fetchPrivateRoom: (params) => api.get('/system/store/compartment/appletList', params),
	fetchPrivateRoom: (params) => api.get('/system/store/compartment/listEmptyRoom', params),
	// 查询优惠券
	fetchUseCoupon: (params) => api.get('/system/userCoupon/listAppNetPay', params),
	// 获取优惠券折扣信息
	fetchCouponDiscount: (params) => api.post('/system/order/calculationMoney', params),
	// 提交订单获取支付信息
	addOrder: (params) => api.post('/system/order/addAPP', params),
	//订单列表待支付支付
	appWxPayOrder: (params) => api.post('/system/order/appWxPayOrder', params),
	// 储值卡支付
	cardPay: (params) => api.post('/system/order/value/addAPP', params),
	// 判断技师是否重复
	determineDuplicates: (params) => api.post('/system/order/examine/itemList', params),
	// 获取退款规则弹窗状态
	fetchRefundTip: (params) => api.get('/system/zyPopup/getZyPopup', params),
	// 更改退款规则弹窗状态
	updateRefundTip: (params) => api.put('/system/zyPopup', params),
	//获取忙碌时间
	getAlltiem: (params) => api.get('/system/technician/getBusyTime', params),
	//修改预约时间
	updateTime: (params) => api.put('/system/order/item/updateSubTime', params),



	// 聚合支付
	aggregatedPay: (params) => api.post('/payapi/mini/wxpay', params, {
		baseUrl: 'http://api2.lfwin.com'
	}),




	orderdelete: (id) => api.delete('/system/order/' + id),
	// 用户订单列表
	fetchOrderList: (params) => api.get('/system/order/user/appList', params),
	// 获取订单详情
	fetchOrderDetail: (id) => api.get('/system/order/' + id),
	// 整个订单退单
	chargeBack: (params) => api.put('/system/order/chargeback', params),
	// 单个项目退单
	projectChargeBack: (params) => api.get('/system/order/chargebackMoney/' + params.id+'/true', params),
	// 修改项目预约时间
	editProjectTime: (params) => api.put('/system/order/item/update/appointment', params),
	// 选择评价的技师列表
	fetchEvaluateTech: (params) => api.get('/system/order/item/back/technicianList', params),
	// 评价技师
	evaluateTech: (params) => api.post('/system/technician/evaluate', params),
	//储蓄卡
	appDiscountFirst: (params) => api.get('/system/value/card/appDiscount/first', params),
	//会员卡
	AppMemberFirst: (params) => api.get('/system/member/AppMember/first', params),

	//删除中间表
	fetchOrderIds: (ids) => api.delete(`/system/transition/${ids}`),
	//评价内容
	getByOrderId: (params) => api.get('/system/evaluate/rule/getByOrderId', params),
	
	//提交评价内容
	addEvaluateAndItem: (params) => api.post('/system/technician/evaluate/addEvaluateAndItem', params),
	//赠送优惠券
	evaluationGitCoupon: (params) => api.post('/system/userCoupon/evaluationGitCoupon', params),
	
	//退单规则
	getStoreChargeback: (params) => api.get('/system/order/chargeback/rule/getStoreChargeback', params),
	
}